<!--
  @author heguanghua
  @since 2019/06/12 19:34
-->
<!DOCTYPE html SYSTEM "http://www.thymeleaf.org/dtd/xhtml1-strict-thymeleaf-4.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.thymeleaf.org">

<table class="layui-hide" id="zmn-table" lay-filter="zmn-table" th:fragment="table">
    <thead>
    <tr>
        <th lay-data="{type:'checkbox', width:50, unresize:true, align:'center', fixed:'left'}"></th>
        <th lay-data="{field:'showSort', width:60, unresize:true, sort:true, align:'center', edit:'text', fixed:'left'}">
            排序
        </th>
        <th lay-data="{field:'productId', width:80, unresize:true, align:'center', fixed:'left'}">产品ID</th>
        <th lay-data="{field:'name', minWidth:120, unresize:false, align:'left', fixed:'left'}">前台产品名称</th>
        <th lay-data="{field:'servCategName', width:160, unresize:false, align:'center'}">服务分类</th>
        <th lay-data="{field:'categOneName', width:160, unresize:false, align:'center'}">前台一级分类</th>
        <th lay-data="{field:'categName', width:160,unresize:false, align:'center'}">前台二级分类</th>
        <th lay-data="{field:'bizTypeStr', width:230, unresize:false, align:'left'}">业务类型</th>
        <th lay-data="{field:'productType', width:230, unresize:false, align:'left'}">产品类型</th>
        <th lay-data="{field:'channelName', width:230, unresize:false, align:'left'}">使用渠道</th>
        <th lay-data="{field:'status', width:90, unresize:true, align:'center'}">状态</th>
        <th lay-data="{field:'updateTime', width:230, unresize:true, align:'center'}">最近修改人/时间</th>
        <th lay-data="{field:'操作',width:80, unresize:true, align:'center', fixed:'right'}">操作</th>
    </tr>
    </thead>

    <tbody>
    <tr th:each="item:${items}">
        <td></td>
        <td th:text="${item.showSort}">showSort</td>
        <td th:text="${item.productId}" class="">productId</td>
        <td th:text="${item.name}" class="layui-gray">name</td>
        <td th:text="${item.servCategName}" class="layui-gray">servCategName</td>
        <td th:text="${item.categOneName}" class="layui-gray">categOneName</td>
        <td th:text="${item.categName}" class="layui-gray">categName</td>
        <td th:text="${item.bizTypeStr}">bizTypeStr</td>
        <td th:text="${T(com.zmn.plat.common.dictionary.ProductDict).translateProductType(item.productType) }">
            productType
        </td>
        <td th:text="${item.channelName}">channelName</td>
        <td>
            <div th:onmouseover="|show_tips(${(#authPermit.checkPermit('/showProduct/updateStatus.action'))},'请先开启“上架/下架”的权限',this)|">
                <input th:disabled="${(#authPermit.checkPermit('/showProduct/updateStatus.action'))?'false':'true'}"
                       type="checkbox" name="status" id="status" th:key="${item.productId}" th:value="${item.status}"
                       lay-text="ON|OFF" lay-skin="switch" lay-filter="chk_status" th:checked="${item.status == 2}"/>
            </div>

        </td>
        <td th:text="${(item.updater==null?'':item.updater+'/')+(item.updateTime==null?'':#dates.format(item.updateTime,'yyyy-MM-dd HH:mm:ss'))}">
            updateTime
        </td>
        <td>
            <div>
                <a th:if="${#authPermit.checkPermit('/showProduct/addEditView.action')}" lay-text="详情"
                   style="color: #00a0e9"
                   th:lay-href="|/showProduct/addEditView.action?productId=${item.productId}|">详情</a>
            </div>
        </td>
    </tr>
    </tbody>
</table>
